<?php
/**
 * Created by PhpStorm.
 * User: liu
 * Date: 2018/9/26
 * Time: 11:38
 */
//phpinfo();
try {
    $pdo = new PDO("mysql:dbname=liu;host=127.0.0.1","root","");
    $pdo->exec("SET   'utf8';");
    $sql1="INSERT INTO `tb_user`(`name`,`age`) VALUES ('小柳',10);";


    $pdo->query($sql1);
}catch (Exception $e)
{
    echo "连接失败".$e->getMessage();
}